﻿using strange.extensions.mediation.impl;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class CubeView : View {

    public Text scoreText;

    /// <summary>
    /// 做初始化
    /// </summary>
	public void Init()
    {
        
    }

    void Update()
    {
        transform.Translate(new Vector3(Random.Range(-0.1f, 0.1f), Random.Range(-0.1f, 0.1f), Random.Range(-0.1f, 0.1f)));
    }

    private void OnMouseDown()
    {
        //加分
        print("点到了");
    }

    public void UpdateScore(int score)
    {
        scoreText.text = score.ToString();
    }
}
